package main


import "./stomp"
import "fmt"
//import "os"

func main(){
	fmt.Println("Starting Connection")
	var newConn = stomp.New()
	newConn.Connect("guest", "guest", "localhost:61613", "8080")
	fmt.Println("Subscribing")
	buf := newConn.Subscribe("/queue/example.B")
      for {
        Get the next line up to the newline
        line, err := buf.ReadString('\x00')
	fmt.Println(line)
        if err != nil{
	fmt.Println(err)
	return
        }
}

